<%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2021/4/22
  Time: 21:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri = "http://java.sun.com/jsp/jstl/core" prefix = "c" %>
<html>
<head>
    <title>新闻</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="../css/news.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="mainDiv">
<%--新闻部分--%>
<div id="news">
    <p class="news1">${newsEntiy.ntitle}</p>
    <p class="news2">作者:${newsEntiy.nauthor}</p>
    <p class="news3">创建于:${newsEntiy.ncreateDate}</p>
    <p class="news4">${newsEntiy.npicPath}</p>
    <p class="news5">&nbsp;&nbsp;${newsEntiy.ncontent}</p>
    <p class="news6">修改时间:${newsEntiy.nmodifyDate}</p>
</div>
</div>
<%--评论部分--%>
<div id="comment">
    <button @click="selectCommentEntiys(${newsEntiy.nid})">查看评论</button>
    <div>
        <div v-for="commentEntiy in commentEntiys">
            <div>
                <p class = "p1">{{commentEntiy.cip}}</p>
                <p class = "p2">{{commentEntiy.cauthor}}</p>
                <p class = "p3">{{commentEntiy.cdate}}</p>
            </div>
                <p class="p4">{{commentEntiy.ccontent}}</p>
        </div>
    </div>


    <input type="text" v-model="ccontext">
    <button @click="addCommentEntiys(${newsEntiy.nid})">发送评论</button>

</div>

<script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
<script src="../js/news.js"></script>
</body>
</html>
